package com.wind.trademark.file.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wind.trademark.base.vo.NodeVo;
import com.wind.trademark.common.dao.BaseDao;
import com.wind.trademark.common.vo.PageBean;
import com.wind.trademark.common.vo.PageParam;
import com.wind.trademark.file.dao.FileDao;
import com.wind.trademark.file.model.FiFile;
import com.wind.trademark.file.service.FileService;
import com.wind.trademark.file.vo.FileVo;
@Service
public class FileServiceImpl implements FileService {
	@Autowired
	private BaseDao baseDao;
	@Autowired
	private FileDao fileDao;
	@Override
	public PageBean queryFile(PageParam pageParam,
			Map<String, Object> params) {
		return fileDao.queryFile(pageParam, params);
	}
	@Override
	public NodeVo getRootFileNode() {
		return fileDao.getRootFileNode();

	}
	@Override
	public List<FileVo> queryFileVoByFileId(Long fileId) {
		return fileDao.queryFileVoByFileId(fileId);
	}
	@Override
	public FiFile loadFiFile(Long id) {
		return baseDao.get(FiFile.class, id);
	}
	@Override
	public FiFile saveOrUpdateFile(FiFile fiFile) {
		 baseDao.saveOrUpdate(fiFile);
		 return fiFile;
	}
	@Override
	public void deleteFiles(List<Long> ids) {
		fileDao.deleteFiles(ids);	
	}


	


}
